<?php
session_start();
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css" />
<title>Wellcome to Charity Organization!</title>
</head>

<body>
<div id="container">
		<div id="header">
			<h1>Charity<span class="off">Organization</span></h1>
        </div>   
        
        <div id="menu">
			<ul>
				<a href="ManageStore.php">Back</a>
            </ul>
        </div>
    
		<div id="content">
        <div id="content_top"></div>
		<div id="content_main">
		<?php
			$link =mysql_connect('localhost','root','');
			if (!$link) {
				die('Not connected : ' . mysql_error());
			}
			$db_selected = mysql_select_db('seproject', $link);
			if (!$db_selected) {
				die ('Cannot useSeproject : ' . mysql_error());
			}
			$Product_ID=$_GET["Product_ID"];
			$query= mysql_query("SELECT * FROM `seproject`.`product` WHERE `Product_ID`='$Product_ID'");
			$a=mysql_fetch_row($query);
			?>
			<h2>Edit product information</h2>
			<h3>Product_ID:	<?php echo $Product_ID;?></h3>
        	<p>&nbsp;</p>
           	<form  method="POST" action="http://localhost/se/slickred/SaveChangesProduct.php?Product_ID=<?php echo $Product_ID;?>" align="right">
			<h3>Category</h3><input type="text" name="Category" value="<?php echo $a[1];?>" /><br>
			<p>&nbsp;</p>
           	<h3>Price</h3><input type="text" name="Price" value="<?php echo $a[3];?>" /><br>
			<p>&nbsp;</p>
           	<h3>Description</h3><input type="text" name="Description" value="<?php echo $a[4];?>" /><br>
			<p>&nbsp;</p>
           	<input type="submit" value="Save" />
			</form>
			
        </div>
        <div id="content_bottom"></div>
      </div>
   </div>
</body>
</html>
